Carbon


GetWindowProperty

Header: MacWindows.h Carbon status: Supported

Obtains a piece of data that is associated with a window.

OSStatus GetWindowProperty (
    WindowRef window, 
    PropertyCreator propertyCreator, 
    PropertyTag propertyTag, 
    UInt32 bufferSize, 
    UInt32 *actualSize, 
    void *propertyBuffer
);
window

A pointer to the window to be examined for associated data.

propertyCreator

The creator code (typically, the application’s signature) of the associated data to be obtained.

propertyTag

The application-defined code identifying the associated data to be obtained.

bufferSize

The size of the associated data to be obtained. If the size of the data is unknown, use the function GetWindowPropertySize to get the data’s size. If the size specified does not match the actual size of the property, GetWindowProperty only retrieves data up to the size specified or up to the actual size of the property, whichever is smaller, and an error is returned.

actualSize

On input, a pointer to a value. On return, the value specifies the actual size of the obtained data. You may pass NULL for the actualSize parameter if you are not interested in this information.

propertyBuffer

On input, a pointer to a buffer. On return, this buffer contains a copy of the data that is associated with the specified window.

function result

A result code.

DISCUSSION

The data retrieved by the GetWindowProperty function must have been previously associated with the window with the function SetWindowProperty.

VERSION NOTES

This function is available with Mac OS 8.5 and later.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when WindowsLib 8.5 or later is installed. Exported by CarbonLib 1.0 and later and by WindowsLib 8.5 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)